#!/usr/bin/python

sentence =  input("Sentence: ")

screenWidth = 80
textWidth = len(sentence)
boxWidth = textWidth +6
leftMargin = (screenWidth - boxWidth) // 2

print()
print(' ' *leftMargin + '+' + '-' * (boxWidth - 2) + '+')
print(' ' * leftMargin + '|  ' + ' ' * textWidth + '  |')
print(' ' * leftMargin + '|  ' + sentence + '  |')
print(' ' * leftMargin + '|  ' + ' ' * textWidth + '  |')
print(' ' *leftMargin + '+' + '-' * (boxWidth - 2) + '+')
print()
